package cn.edu.ujn.food.dao;

import cn.edu.ujn.food.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface UserDao {

    User queryById(Integer userId);

    List<User> queryAllByLimit(User user, @Param("pageable") Pageable pageable);

    long count(User user);

    int insert(User user);

    int insertBatch(@Param("entities") List<User> entities);

    int insertOrUpdateBatch(@Param("entities") List<User> entities);

    int update(User user);

    int deleteById(Integer userId);

    User selectByUser(User user);

    List<User> selectAll(User user);

    Integer selectCount();

    List<User> findAll();
}

